import com.lyw.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

class AndroidFeatureConventionPlugin:Plugin<Project> {

    override fun apply(project: Project) {
        with(project) {

            pluginManager.apply{
                apply("lyw.android.library")
                apply("lyw.hilt")
                apply("org.jetbrains.kotlin.plugin.serialization")
            }

            dependencies{
                add("implementation",project(":commlib"))
                add("implementation",libs.findLibrary("androidx.core.ktx").get())
                add("implementation",libs.findLibrary("androidx.appcompat").get())
                add("implementation",libs.findLibrary("google.android.material").get())
                add("implementation",libs.findLibrary("androidx.activity.ktx").get())
                add("implementation",libs.findLibrary("androidx.fragment.ktx").get())
                add("implementation",libs.findLibrary("banner").get())
                add("implementation",libs.findLibrary("coil.kt").get())
                add("implementation",libs.findLibrary("utilcodex").get())
                add("implementation",libs.findLibrary("mmkv").get())
                add("implementation",libs.findLibrary("arouter.api").get())
                add("kapt",libs.findLibrary("arouter.compiler").get())
                add("implementation",libs.findLibrary("superTextView").get())
                add("implementation",libs.findLibrary("retrofit.core").get())
                add("implementation",libs.findLibrary("retrofit.converterGson").get())
                add("implementation",libs.findLibrary("adapterHelper").get())
                add("implementation",libs.findLibrary("titleBar").get())
                add("implementation",libs.findLibrary("circleImageView").get())
                add("implementation",libs.findLibrary("gyfImmersionbar").get())
//                add("implementation",libs.findLibrary("photoView").get())
            }
        }
    }
}